#ifndef _SENSER_CFG_H__
#define _SENSER_CFG_H__

#include "stm32g4xx_hal.h"


/***************管脚配置************/
#define GPIO_MISO_A_Pin         GPIO_PIN_4
#define GPIO_MISO_A_GPIO_Port   GPIOB
#define SPIX_MOSI_A_ALTERNATE   GPIO_AF5_SPI1
#define TIMX_MOSI_A_ALTERNATE   GPIO_AF2_TIM3

#define GPIO_MOSI_B_Pin         GPIO_PIN_5
#define GPIO_MOSI_B_GPIO_Port   GPIOB
#define SPIX_MOSI_B_ALTERNATE   GPIO_AF5_SPI1
#define TIMX_MOSI_B_ALTERNATE   GPIO_AF2_TIM3

#define GPIO_SCLK_Z_Pin         GPIO_PIN_3
#define GPIO_SCLK_Z_GPIO_Port   GPIOB
#define SPIX_SCLK_Z_ALTERNATE   GPIO_AF5_SPI1

#define SENSER_SPI_CS_Pin       GPIO_PIN_11
#define SENSER_SPI_CS_GPIO_Port GPIOC





/***************************SPI配置**********************/
#define SENSER_SPI_INSTANCE SPI1
#define SENSER_SPI_CLK_ENABLE() __HAL_RCC_SPI1_CLK_ENABLE()

#define SENSER_SPI_RX_DMA_INSTANCE DMA1_Channel2
#define SENSER_SPI_RX_DMA_REQUEST  DMA_REQUEST_SPI1_RX

#define SENSER_SPI_TX_DMA_INSTANCE DMA1_Channel3
#define SENSER_SPI_TX_DMA_REQUEST  DMA_REQUEST_SPI1_TX

/***************************TIM配置**********************/
#define SENSER_TIM_INSTANCE TIM3
#define SENSER_TIM_CLK_ENABLE() __HAL_RCC_TIM3_CLK_ENABLE()


extern TIM_HandleTypeDef shenser_htim;







#endif






